data = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]

groups = {}

for item in data:
    if item not in groups:
        groups[item] = []
    groups[item].append(item)

for key, group in groups.items():
    print(f"Key: {key}, Group: {group}")